@echo off & setlocal enabledelayedexpansion

set LIB_JARS=""
cd ..\lib
for %%i in (*) do set LIB_JARS=!LIB_JARS!;..\lib\%%i
cd ..\bin

if ""%1"" == ""debug"" goto debug
if ""%1"" == ""jmx"" goto jmx

java ${script.server.java_mem_opts}  -jar ../lib/@project.build.finalName@.jar --spring.config.location=../config/ --spring.profiles.active=@profileActive@
goto end

:debug
java ${script.server.java_mem_opts} ${script.server.java_debug_opts}  -jar ../lib/@project.build.finalName@.jar --spring.config.location=../config/ --spring.profiles.active=@profileActive@
goto end

:jmx
java ${script.server.java_mem_opts} ${script.server.java_jmx_opts}  -jar ../lib/@project.build.finalName@.jar --spring.config.location=../config/ --spring.profiles.active=@profileActive@

:end
pause